package com.concurrent.queue.demo1;

import java.util.Scanner;

public class JuiceClient {
	
	public static void main(String[] args) {
		JuiceShop shop = new JuiceShop();
		shop.start();
		Scanner s = new Scanner(System.in);
		do {
			System.out.println("请输入购买数量:");
			String line = s.nextLine();
			if(line.equals("esc")){
				break;
			}
			Integer count = Integer.valueOf(line);
			try {
				shop.getJuice(count);
			} catch (InterruptedException e) {
				e.printStackTrace();
			}
		} while (true);
	}

}
